using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
using SlimDX;
using Barrage.Global;

namespace Barrage.GUI.Elements
{
    /// <summary>
    /// A GUIButtonListOption is a GUIButton that can be placed in a button list
    /// </summary>
    public class GUIButtonListOption : GUIButton,GUIButtonListElement
    {
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="layout">Layout that will hold this item</param>
        /// <param name="template">Template that will be used to render this item</param>
        /// <param name="xn">Xml Node that holds attribute values of this item</param>
        public GUIButtonListOption(GUILayout layout, string template, XmlNode xn)
            : base(layout, template,xn)
        {
        }

        /// <summary>
        /// A GUIButtonListOption is selectable, so this property is always true
        /// </summary>
        public bool IsSelectable
        {
            get { return true; }
        }

        /// <summary>
        /// GUISelectableElement direct cast of this instance
        /// </summary>
        public GUISelectableElement SelectableElement
        {
            get { return (GUISelectableElement)this; }
        }

        /// <summary>
        /// GUIElement direct cast of this instance
        /// </summary>
        public GUIElement Element
        {
            get { return (GUIElement)this; }
        }
    }
}
